home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 July / 07_02.iso / software / xq-xsetup / files / setup.exe / {app} / plugins / XQ WinNT Logoff Romaing Profiles 1.xpl < prev    next >
Text File  |  2001-08-04  |  3KB  |  102 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "UIPATH"="Startup/Shutdown\Shutdown\Windows NT/2K/XP\10) Program Shutdown"
  5. "NAME"="Romaing Profiles Ignore Directories"
  6. "VERSION"="1.00"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="010111"
  9. "TEXT 1"="Add..."
  10. "TEXT 2"="Remove selection"
  11. "DESCRIPTION 1"="If you are using "Roaming Profiles" (that is, upon logon your personal files are download from a server and on logoff uploaded again), you might want some folders not be uploaded to the server."
  12. "DESCRIPTION 2"="For example, the folder "Temporary Internet Files" is only a cache folder and it simply not very usefull to upload this to the server, especially as it can get very huge."
  13. "DESCRIPTION 3"="Simply add the folder you do NOT want to have upload in this list, given from the personal folder of the user."
  14. "DESCRIPTION 4"="For example, if the personal folder of the current user is "C:\WINNT\PROFILES\MyUser" and the folder you want to exclude is "C:\WINNT\PROFILES\MyUser\Useless Stuff", simply add "Useless Stuff"."
  15. "AUTHOR"="Xteq Systems"
  16. "CONTACTURL"="http://www.xteq.com/"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"=""
  19.  
  20.  
  21. sV="HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ExcludeProfileDirs" 'STR!
  22. iCount=0
  23.  
  24. Sub Plugin_Initialize 
  25.  Call InitListbox
  26. End Sub
  27.  
  28.  
  29.  
  30.  
  31. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  32.  if ElementIndex=1 then 'ADD
  33.     s=InputWindow("Please enter the extension to unblock, e.g. <EXE>","",1)
  34.     if IsEmpty(s)=false then
  35.        if Len(s)>0 then
  36.           iCount=iCount+1
  37.           Call SetUIElement(iCount,s)
  38.           Call WriteRegistry()
  39.           Call InitListbox()              
  40.        end if
  41.     end if
  42.  
  43.  elseif ElementIndex=2 then 'REMOVE
  44.    if ElementSubIndex=0 then
  45.       Call MsgError("Please select an extension to remove")
  46.    else
  47.       Call SetUIElement(ElementSubIndex,"")
  48.       iCount=iCount-1
  49.  
  50.       Call WriteRegistry()
  51.       Call InitListbox()
  52.    end if
  53.  end if
  54.  
  55.  
  56. ' Call Logoff()
  57. End Sub
  58.  
  59.  
  60. Sub InitListbox
  61.  for i=1 to iCount
  62.      Call SetUIElement(i,"")
  63.  next
  64.  
  65.  iCount=0
  66.  
  67.  s=RegReadValue(sV)
  68.  if IsEmpty(s)=false then
  69.     'Dim ary()
  70.     ary=Split(s,";")
  71.  
  72.     for l=lBound(ary) to ubound(ary)
  73.         s=ary(l)
  74.         s=lcase(s)
  75.         if len(s)>0 then           
  76.  
  77.            iCount=iCount+1
  78.            Call SetUIElement(iCount,s)
  79.         end if
  80.     next
  81.  end if
  82.  
  83. end sub
  84.  
  85.  
  86. Sub WriteRegistry
  87.  s=""
  88.  for i=1 to iCount
  89.      s2=GetUIElement(i)
  90.      s=s & UCASE(s2) & ";"
  91.  next
  92.  
  93.  Call RegWriteValue(sV,s,1)
  94. End Sub
  95.  
  96.  
  97. Sub Plugin_Terminate 
  98. End Sub
  99.  
  100.  
  101.  
  102.